'use strict';
const dayjs = require("dayjs");
module.exports = app => {
    const { STRING, INTEGER, TINYINT } = app.Sequelize;
    return app.model.define(
      'user',
      {
          id: {type: INTEGER, primaryKey: true, autoIncrement: true},
          username: STRING(20),
          sex: STRING(4),
        telephone: STRING(20),
        email: STRING(20),
        status: INTEGER,
        password: STRING(20),
        version: INTEGER,
        is_deleted: TINYINT(1),
      },
      {
          tableName: 'user',
          timestamps: true, // 启用时间戳(createdAt, updatedAt)
          updatedAt: false, // 不想要 updatedAt
          createdAt: false, // 想要  createdAt 但是希望名称叫做 created_at
      }
  );
};
